<!doctype html>
<html>

<head>
    <template source='TPL:admin.common.head' />
</head>

<body>
    <div class="wrap">
        <div class="nav">
            <ul class="cc">
                <li><a href="{@WindUrlHelper::createUrl('/app/torrent/manage/run')}">基本设置</a></li>
                <li><a href="{@WindUrlHelper::createUrl('/app/torrent/manage/agent')}">客户端设置</a></li>
                <li class="current"><a href="{@WindUrlHelper::createUrl('/app/torrent/manage/credit')}">积分设置</a></li>
                <li><a href="{@WindUrlHelper::createUrl('/app/torrent/manage/type')}">资源类型绑定</a></li>
            </ul>
        </div>
        <form method="post" class="J_ajaxForm" action="{@WindUrlHelper::createUrl('/app/torrent/manage/docredit')}">
            <div class="h_a">自定义积分设置</div>
            <div class="table_full">
                <table width="100%" id="J_group_table">
                    <col width="100" />
                    <col width="80" />
                    <col />
                    <!--# if (is_array($creditType)) { #-->
                    <!--# foreach ($creditType as $key => $type) { #-->
                    <tr>
                        <th>{$type}</th>
                        <td>
                            <label>
                                <input type="checkbox" name="credits[{$key}][enabled]" value="1" {@Pw::ifcheck($config[ 'app.torrent.credits'][$key][ 'enabled']==1 )}><span>启用</span>
                            </label>
                        </td>
                        <td>
                            <input type="text" name="credits[{$key}][exp]" class="input" value="{$config['app.torrent.credits'][$key]['exp']}" style="width: 100%;">
                        </td>
                    </tr>
                    <!--# } #-->
                    <!--# } #-->
                    <tr>
                        <td colspan="3">可用参数及函数见 <a href="https://github.com/kinosang/WindTurbine#expression">WindTurbine</a></td>
                    </tr>
                </table>
            </div>
            <div class="btn_wrap">
                <div class="btn_wrap_pd">
                    <button class="btn btn_submit mr10 J_ajax_submit_btn" type="submit">提交</button>
                </div>
            </div>
        </form>
        <template source='TPL:admin.common.footer' />
    </div>
</body>

</html>
